package com.cpecc.model.wuzi;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import com.cpecc.model.system.User;

@Entity
@Table(name = "DATA_WUZI_CAIGOU")
public class CaiGou implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2979343459934239990L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@Column(length = 64)
	private String tuJing;
	
	@Column(length=2)
	private int fangShi;
	
	@Column(length=128)
	private String beiZhu;
	
	@ManyToOne
	@JoinColumn(name="WUZI_ID")
	private WuZi wuZi;
	
	@Column
	private Date caiGouRQ;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTuJing() {
		return tuJing;
	}

	public void setTuJing(String tuJing) {
		this.tuJing = tuJing;
	}

	public int getFangShi() {
		return fangShi;
	}

	public void setFangShi(int fangShi) {
		this.fangShi = fangShi;
	}

	public String getBeiZhu() {
		return beiZhu;
	}

	public void setBeiZhu(String beiZhu) {
		this.beiZhu = beiZhu;
	}

	public WuZi getWuZi() {
		return wuZi;
	}

	public void setWuZi(WuZi wuZi) {
		this.wuZi = wuZi;
	}

	public Date getCaiGouRQ() {
		return caiGouRQ;
	}

	public void setCaiGouRQ(Date caiGouRQ) {
		this.caiGouRQ = caiGouRQ;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public CaiGou(String id, String tuJing, int fangShi, String beiZhu,
			WuZi wuZi, Date caiGouRQ, User user) {
		super();
		this.id = id;
		this.tuJing = tuJing;
		this.fangShi = fangShi;
		this.beiZhu = beiZhu;
		this.wuZi = wuZi;
		this.caiGouRQ = caiGouRQ;
		this.user = user;
	}

	public CaiGou() {
		super();
	}
}
